﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    class Computer
    {
        private string brand;

        private Iusb usb1;
        private Iusb usb2;

        public Computer(string brand)
        {
            this.brand = brand;
        }
        public Computer()
        {

        }

        public string Brand { get => brand; set => brand = value; }
        internal Iusb Usb1 { get => usb1; set => usb1 = value; }
        internal Iusb Usb2 { get => usb2; set => usb2 = value; }
        public void Start()
        {
            Console.WriteLine("{0}电脑开机中", this.brand);
        }
        public void End()
        {
            Console.WriteLine("{0}电脑关机中", this.brand);
        }

        public void ReadData()
        {
            usb1.read();
            usb2.read();
        }

        public void WriteData()
        {
            usb1.write();
            usb2.write();
        }
    }
}
